os npcs de clone, hunter, police e rocket seguem o player.. ;x
- Fórum
- OTServ
- Suporte
- Tópicos Sem Resposta
- [Encerrado] [Pokemon] Dúvidas? - Pda
[Encerrado] [Pokemon] Dúvidas? - Pda
Por lucashgas, 10 de jan. de 2012 em Tópicos Sem Resposta
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

info
Grupo: Visconde
Registrado: 22/07/12
Posts: 298
Reputação: +28
Char no Tibia: Lendreo

@Slicer, sorry, nem vi ![]()
Editado Setembro 8 por Lendreo
info
Grupo: Infante
Registrado: 25/01/12
Posts: 1.6k
Reputação: +330

@Slicer..
tava pensando em algumas quest aki..
tenho uma duvida.. teria como
tipo queria faze uma quest da equipe rocket para os policiais lutar com o gionvanii tal..
teria como no script do npc giovani, colokar assim, o giovanii usa 6 poke, e depois vai um policial e mata ele, e depois ele usa 6 poke diferentes,e dps vai outro policial e mata ele, ele usa 6 pokes diferentes.
@Conclusão.
teria como colokar pra ele não usar sempre os mesmo pokes?
e sim usar 6 poke de cada morte de lvl 100 - menos os poke ? thanks yo!
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

@all
Patchs 1.6.1/2.6.1 postados no topico de download! foram apenas pequenas correçoes mas... ^^ enjoy!
@stylo
da pra por um math.random pra deixar aleatorio os pokes dele.. ou fazer alguns 'packs' de 6 pokes, q nem nos npcs de policia/rocket... da pra fazer bastante coisa.. ;x
Editado Setembro 8 por Slicer
info
Grupo: Infante
Registrado: 25/01/12
Posts: 1.6k
Reputação: +330

Demoro Slicer.
@Slicer outra duvida.
teria como tu da uma ajuda a colokar teleport igual pxg?
precisa fala hi pra cada nursey ?
meu amigo falo que cada cidade teria sua nursey, ai ele configuro uma pra min, e eu configurei o resto.
ai ele nem entro mais, teria como da uma ajudinha?
explica só 1 vez, eu faço todas ![]()
info
Grupo: Visconde
Registrado: 22/07/12
Posts: 298
Reputação: +28
Char no Tibia: Lendreo

Gente mais uma atuzalição do mapa. [Algumas partes do mapa tem hunts de estrada maiores,como na saffari, irei arrumar.]

Porfavor, comentem,criticas e sugestões aceitas.
Editado Setembro 8 por Lendreo
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

@stylo
eu fiz aki o sistema.. soh precisa de 1 nurse na real... ;p
npc/scripts/heal.lua
local pokeballs = {
[1] = {effect = 188, on = 11826, use = 11827, off = 11828, all = {11826, 11827, 11828}},
[2] = {effect = 191, on = 11829, use = 11830, off = 11831, all = {11829, 11830, 11831}},
[3] = {effect = 190, on = 11835, use = 11836, off = 11837, all = {11835, 11836, 11837}},
[4] = {effect = 189, on = 11832, use = 11833, off = 11834, all = {11832, 11833, 11834}},
[5] = {effect = 188, on = 11737, use = 11738, off = 11739, all = {11737, 11738, 11739}},
[6] = {effect = 189, on = 11740, use = 11741, off = 11742, all = {11740, 11741, 11742}},
[7] = {effect = 190, on = 11743, use = 11744, off = 11745, all = {11743, 11744, 11745}},
[8] = {effect = 191, on = 11746, use = 11747, off = 11748, all = {11746, 11747, 11748}},
}
local posis = { --[storage da city] = {pos da nurse na city},
[897530] = {x = 1069, y = 1145, z = 7},
[897531] = {x = 1081, y = 1064, z = 7}, --alterado teleport
[897532] = {x = 1059, y = 927, z = 6},
}
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye sir!')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
local msg = string.lower(msg)
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
for a, b in pairs(gobackmsgs) do
local gm = string.gsub(b.go, "doka!", "")
local bm = string.gsub(b.back, "doka!", "")
if string.find(string.lower(msg), string.lower(gm)) or string.find(string.lower(msg), string.lower(bm)) then
return true
end
end
if((msgcontains(msg, 'hi') or msgcontains(msg, 'heal') or msgcontains(msg, 'help')) and (getDistanceToCreature(cid) <= 3)) then
if exhaustion.get(cid, 9211) then
selfSay('Please wait a few moment before asking me to heal your pokemons again!')
return true
end
if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then
selfSay("Please, get inside the pokémon center to heal your pokemons!")
return true
end
if getPlayerStorageValue(cid, 52480) >= 1 then
selfSay("You can't do that while in a Duel!") --alterado v1.6.1
return true
end
for e, f in pairs(posis) do
local pos = getThingPos(getNpcCid())
if pos.x == f.x and pos.y == f.y and pos.z == f.z then
if getPlayerStorageValue(cid, e) <= -1 then --alterado teleport
setPlayerStorageValue(cid, e, 1)
end
end
end
exhaustion.set(cid, 9211, 5)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))
doCureStatus(cid, "all", true)
doSendMagicEffect(getThingPos(cid), 132)
local mypb = getPlayerSlotItem(cid, 8)
if #getCreatureSummons(cid) >= 1 then
if not nurseHealsPokemonOut then
selfSay("Please, return your pokemon to his ball!")
return true
end
local s = getCreatureSummons(cid)[1]
doCreatureAddHealth(s, getCreatureMaxHealth(s))
doSendMagicEffect(getThingPos(s), 13)
doCureStatus(s, "all", false)
if getPlayerStorageValue(s, 1008) < baseNurseryHappiness then
setPlayerStorageValue(s, 1008, baseNurseryHappiness)
end
if getPlayerStorageValue(s, 1009) > baseNurseryHunger then
setPlayerStorageValue(s, 1009, baseNurseryHunger)
end
else
if mypb.itemid ~= 0 and isPokeball(mypb.itemid) then --alterado v1.3
doItemSetAttribute(mypb.uid, "hp", 1)
if getItemAttribute(mypb.uid, "hunger") and getItemAttribute(mypb.uid, "hunger") > baseNurseryHunger then
doItemSetAttribute(mypb.uid, "hunger", baseNurseryHunger)
end
for c = 1, 15 do
local str = "move"..c
setCD(mypb.uid, str, 0)
end
if getItemAttribute(mypb.uid, "happy") and getItemAttribute(mypb.uid, "happy") < baseNurseryHappiness then
doItemSetAttribute(mypb.uid, "happy", baseNurseryHappiness)
end
if getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and getPlayerStorageValue(cid, 63215) <= 0 then
for a, b in pairs (pokeballs) do
if isInArray(b.all, mypb.itemid) then
doTransformItem(mypb.uid, b.on)
end
end
end
end
end
local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)
for balls = 1, 8 do --editar a qntdade de balls da tabela ali decima...
for times = 1, 3 do
local items = getItemsInContainerById(bp.uid, pokeballs[balls].all[times])
if #items >= 1 then
for _, uid in pairs(items) do
doItemSetAttribute(uid, "hp", 1)
doTransformItem(uid, pokeballs[balls].on)
for c = 1, 15 do
local str = "move"..c
setCD(uid, str, 0) --alterado v1.3
end
if getItemAttribute(uid, "hunger") and getItemAttribute(uid, "hunger") > baseNurseryHunger then
doItemSetAttribute(uid, "hunger", baseNurseryHunger)
end
if getItemAttribute(uid, "happy") and getItemAttribute(uid, "happy") < baseNurseryHappiness then
doItemSetAttribute(uid, "happy", baseNurseryHappiness)
end
end
end
end
end
selfSay('There you go! You and your pokemons are healthy again.')
end
end
talkactions/scripts/tele.lua
local poke = {'Abra', 'Kadabra', 'Alakazam', 'Drowzee', 'Hypno', 'Mr. Mime', 'Porygon', 'Porygon2', "Shiny Abra",
"Shiny Alakazam", "Shiny Hypno"}
local etele = 9499
local cdtele = 1800
local config = {
premium = false, -- se precisa ser premium account (true or false)
battle = true -- se precisa estar sem battle (true). Se colocar false, poderá usar teleport no meio de batalhas
}
--[[local places = {
[1] = {name = "Saffron", id = 1},
[2] = {name = "Cerulean", id = 2},
[3] = {name = "Lavender", id = 3},
[4] = {name = "Fuchsia", id = 4},
[5] = {name = "Celadon", id = 5},
[6] = {name = "Pewter", id = 6, sto = 897532},
[7] = {name = "Pallet", id = 7, sto = 897530},
[8] = {name = "Viridian", id = 8, sto = 897531},
[9] = {name = "Vermilion", id = 9},
[10] = {name = "Cinnabar", id = 10},
[11] = {name = "Unnamed Town", id = 11},
[12] = {name = "Diamond City", id = 12},
[13] = {name = "Hasland Island", id = 13},
} ]]
local places = {
[1] = {name = "Pallet", id = 1, sto = 897530},
[2] = {name = "Viridian", id = 2, sto = 897531}, --alterado teleport essa sao as do meu mapa.. o importante eh ter o 'sto = ...'
[3] = {name = "Pewter", id = 3, sto = 897532},
}
function onSay(cid, words, param)
if #getCreatureSummons(cid) == 0 then
doPlayerSendCancel(cid, "You need a pokemon to use teleport.")
return true
end
if not isInArray(poke, getCreatureName(getCreatureSummons(cid)[1])) then
return 0
end
if getPlayerStorageValue(cid, 22545) == 1 then --golden arena
doPlayerSendCancel(cid, "You can't do that while the golden arena!")
return true
end
if getPlayerStorageValue(cid, 212124) >= 1 then --alterado v1.6
return doPlayerSendCancel(cid, "You can't do it with a pokemon with mind controlled!")
end
if getPlayerStorageValue(cid, 52480) >= 1 then
return doPlayerSendCancel(cid, "You can't do it while a duel!") --alterado v1.6
end
if exhaustion.get(cid, etele) and exhaustion.get(cid, etele) > 0 then
local tempo = tonumber(exhaustion.get(cid, etele)) or 0
local min = math.floor(tempo)
doPlayerSendCancel(cid, "Your pokemon is tired, wait "..getStringmytempo(tempo).." to teleport again.")
return true
end
if config.premium and not isPremium(cid) then
doPlayerSendCancel(cid, "Only premium members are allowed to use teleport.")
return true
end
if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then
doPlayerSendCancel(cid, "Your pokemon can't concentrate during battles.")
return true
end
if (param == '') then
local str = ""
str = str .. "Places to go :\n\nHouse\n"
for a = 1, #places do
str = str..""..places[a].name.."\n"
end
doShowTextDialog(cid, 7416, str)
return true
end
local item = getPlayerSlotItem(cid, 8)
local nome = getPokeballName(item.uid)
local summon = getCreatureSummons(cid)[1]
local lastppos = getThingPos(cid)
local lastspos = getThingPos(summon)
local telepos = {}
local myplace = ""
local townid = 0
local citySto = 0 --alterado teleport
if string.lower(param) == "house" then
if not getHouseByPlayerGUID(getPlayerGUID(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You don't own a house.")
return true
end
telepos = getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid)))
myplace = "our home"
else
for x = 1, #places do
if string.find(string.lower(places[x].name), string.lower(param)) then
townid = places[x].id
myplace = places[x].name
citySto = places[x].sto --alterado teleport
end
end
if myplace == "" then
doPlayerSendCancel(cid, "That place doesn't exist.")
return true
end
end
if myplace ~= "" and townid > 0 then
telepos = getTownTemplePosition(townid)
end
if getPlayerStorageValue(cid, citySto) <= -1 then --alterado teleport
doPlayerSendCancel(cid, "You have to talk with nurse this place, before you can teleport for there!")
return true
end
if getDistanceBetween(getThingPos(cid), telepos) <= 15 then
doPlayerSendCancel(cid, "You are too near to the place you want to go!")
return true
end
doSendMagicEffect(getThingPos(summon), 29)
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, telepos, false)
local pos2 = getClosestFreeTile(cid, getPosByDir(getThingPos(cid), SOUTH))
doTeleportThing(summon, pos2, false)
doSendMagicEffect(getThingPos(cid), 29)
doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", 1)
doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", 1, false, 0, lastppos)
doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER)
doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER, false, 0, lastspos)
doCreatureSetLookDir(cid, SOUTH)
doCreatureSetLookDir(summon, SOUTH)
doSendMagicEffect(getThingPos(summon), CONST_ME_TELEPORT)
exhaustion.set(cid, etele, cdtele)
return true
end
oq eu mudei ta com a tag '--alterado teleport'... qlqr duvida avisa... ^^
info
Grupo: Infante
Registrado: 25/01/12
Posts: 1.6k
Reputação: +330

@Slier valeuu auhdshads
sabe como só otimo script nea, (nunca¬¬).
pra eu as city é so eu adicionado aki
local places = {
ai boto nome da city, e vo almentado a storage
Exemplo
[3] = {name = "Pewter", id = 3, sto = 897532},
[3] = {name = "Cerulean", id = 4, sto = 897533},
se for só isso, thanks, amanha te dó rep ![]()
e tem que editar aki tambem?
local posis = { --[storage da city] = {pos da nurse na city},[897530] = {x = 1532, y = 975, z = 7},
[897531] = {x = 1081, y = 1064, z = 7}, --alterado teleport
[897532] = {x = 1059, y = 927, z = 6},
}
só edita tudo isso pro tp fica certo com meu mapa ? obrigado dnv kk
Editado Setembro 8 por StyloMaldoso
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

@stylo
aki \/... vc vai colocando as citys e as storages das citys.. levando em conta o teu mapa! o id ali eh o id da city no mapa editor... a storage pode ser qlqr uma...
local places = {
[1] = {name = "Pallet", id = 1, sto = 897530},
[2] = {name = "Viridian", id = 2, sto = 897531}, --alterado teleport essa sao as do meu mapa.. o importante eh ter o 'sto = ...'
[3] = {name = "Pewter", id = 3, sto = 897532},
}
e dai aki \/... os '[ ]' tu coloca as storages das citys q tu coloco ali na tabela decima... e em '{ }' tu coloca a pos da nurse daquela city...
local posis = { --[storage da city] = {pos da nurse na city},
[897530] = {x = 1069, y = 1145, z = 7},
[897531] = {x = 1081, y = 1064, z = 7}, --alterado teleport
[897532] = {x = 1059, y = 927, z = 6},
}
exemplo...
local places = {
[1] = {name = "Pallet", id = 1, sto = 897530},
...
}
aki no caso a city de pallet eh a city 1 do meu mapa, e eu coloquei uma storage qlqr para essa city...
local posis = { --[storage da city] = {pos da nurse na city},
[897530] = {x = 1069, y = 1145, z = 7},
e dai aki eu coloquei dentro do '[ ]' a ms storage q eu coloquei para pallet ali emcima... e em '{ }' eu coloquei a pos da nurse q fica em pallet...
Editado Setembro 8 por Slicer
info
Grupo: Infante
Registrado: 25/01/12
Posts: 1.6k
Reputação: +330

Ahh pode pá slicer, valeu mesmo ![]()
eu tava errando na hora de bota a position da nursey ;x
obrigado ae ![]()
Slicer
Falto um Arquivo em>> data\talkactions\scripts
chamado de "mutePlayer2"
é pq eu coloquei o seu talkactions.xml
ai apareceu esse Erro pq falto o tal dai de cima
[08/09/2012 18:28:39] [Error - LuaScriptInterface::loadFile] cannot open data/talkactions/scripts/mutePlayer2.lua: No such file or directory
[08/09/2012 18:28:39] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/mutePlayer2.lua)
[08/09/2012 18:28:39] cannot open data/talkactions/scripts/mutePlayer2.lua: No such file or directory
ata vou baixar o Serv Full v1.6 fica mais facil la tem o arquivo rsrs
malz ae ^^
Editado Setembro 8 por digodigo4
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

na verdade eu esqueci de tirar essa linha... ;x era coisa q eu tava fazendo aki soh q n deu muito certo e eu esqueci de excluir.. ;x eh soh tirar a linha do talkactions.xml q ta lgl hehe n eh nd importante ;x
Os negocio de full defense só podem ser feitos em source ?
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

@maguito
sim sim.. ;/ ja tentei procurar alguma funçao q verificase qual deles ali tava ativo, mas n achei nd e pah.. achu q soh mudando oq eles fazem atualmente nas sources ms...
Editado Setembro 8 por Slicer







info
Grupo: Visconde
Registrado: 22/07/12
Posts: 298
Reputação: +28
Char no Tibia: Lendreo
@all, aki sinceramente não houve nenhum erro em todas as spells,e o shiny charizard aki funciona 100% corpse loot. [uso o 2.6]
@Slicer vc consegue fazer um npc seguir o player?